#ifndef KEEPUP_H
#define KEEPUP_H

#include <iostream>
#include <fstream>
#include <string>
#include <vector>

using namespace std;

class Calendar {
public:
	enum COMMAND_TYPE { TASKADD, TASKDELETE, TASKMODIFY, TASKDISPLAY, TASKMARKDONE };

	void execute();
	void command(string);
	COMMAND_TYPE convertToEnum(string);
	void welcomeMessage();
	void taskAdd();
	void taskDelete();
	void taskModify();
	void taskDisplay();
	void taskMarkDone();
	void saveChanges();
		
private:	
	static const string MESSAGE_WELCOME;
	static const string COMMAND_EXIT;
};

class Task {

public:
	/* enum for the vector needed for task constructor */
	enum ATTR {
		STARTYEAR, STARTMONTH, STARTDATE, STARTHOUR, STARTMINUTE, ENDYEAR,
		ENDMONTH, ENDDATE, ENDHOUR, ENDMINUTE, PRIORITY, TASKNAME, DESCRIPTION,
		ISDONE, HASEXPIRED
	};

	/* constructors */
	Task();
	Task(vector<string> attributes);

	/* destructor */
	~Task();

	/* getter */
	vector<string> getAttributes();
	

private:
	/* attributes */
	int startYear;
	int startMonth;
	int startDate;
	int startHour;
	int startMinute;
	int endYear;
	int endMonth;
	int endDate;
	int endHour;
	int endMinute;
	int priority;
	string taskName;
	string description;
	bool isDone;
	bool hasExpired;

	bool getBooleanValue(string s);
};

/*
add: enter "add" "description" "at" "time" "on" "date"
*/
class CommandParser {
public:
	/* break down the user input to know what to put where into the task. */

	string getCommand();
	string getStartYear(string);
	string getStartMonth(string);
	string getStartDate(string);
	string getStartHour();
	string getStartMinute();
	string getEndYear();
	string getEndMonth();
	string getEndDate();
	string getEndHour();
	string getEndMinute();
	string getTaskName();
	static vector<string> getDescription(string s);

	void setUserInput(string s);

private:
	vector<string> userInput;
	string time;
};

#endif